home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1008 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Contradiction on operator delete in Jan'96 DWP
  5. Followup-To: comp.std.c++
  6. Date: 8 Apr 1996 22:08:26 GMT
  7. Organization: Comp Sci, University of Melbourne
  8. Approved: clamage@eng.sun.com (comp.std.c++)
  9. Message-ID: <4kc2oq$bg1@engnews1.Eng.Sun.COM>
  10. References: <4k9tll$b5r@netlab.cs.rpi.edu>
  11. NNTP-Posting-Host: taumet.eng.sun.com
  12. Originator: clamage@taumet
  13.  
  14. { Note followups to comp.std.c++. -mod clc++m }
  15.  
  16. oliva@dcc.unicamp.br (Alexandre Oliva) writes:
  17.  
  18. >Section 5.3.4 [expr.new] of the Jan'96 DWP states:
  19.  
  20. Articles like this should be posted to comp.std.c++ rather than
  21. comp.lang.c++.moderated.  I've crossposted and redirected followups there.
  22.  
  23. >19A  declaration of placement operator delete matches the declaration of
  24. >  a placement operator new when it has the same number of parameters and
  25. >  all  parameter  types except the first are identical disregarding top-
  26. >  level cv-qualifiers.
  27. >
  28. >This seems to  imply that operator delete may  be overloaded, and  may
  29. >have as many formal arguments as desired.
  30.  
  31. Yes, that's right.
  32.  
  33. >However,
  34. >
  35. >Section 3.7.3.2 [basic.stc.dynamic.deallocation] states:
  36. >
  37. >2 Each  deallocation  function shall return void and its first parameter
  38. >  shall be void*.  For class member  deallocation  functions,  a  second
  39. >  parameter  of  type size_t (_lib.support.types_) may be added. If both
  40. >  versions are declared in the same class, the one-parameter form is the
  41. >  usual  deallocation  function  and  the two-parameter form is used for
  42. >  placement delete (_expr.new_). If the second version is  declared  but
  43. >  not  the  first,  it is the usual deallocation function, not placement
  44. >  delete.
  45. >
  46. >This seems   not  to allow  those  matching operator  delete's   to be
  47. >declared.
  48.  
  49. You are misinterpreting this paragraph.  It does not prohibit overloading
  50. operator delete, or using as many formal arguments as desired.
  51.  
  52. (Which sentence in the above paragraph did you think prohibited
  53. declaring those matching `operator delete's?)
  54.  
  55. --
  56. Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
  57. WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
  58. PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
  59.  
  60. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  61. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  62. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  63. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  64. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  65.